#ifndef _C_VIEW_D3D_9_H_
#define _C_VIEW_D3D_9_H_

#include "CView.h"
#include <d3d9.h>

#include <map>

using namespace std;

class SRendererDX9;
class CImage;

class CViewD3D9 : public CView
{
public:
	CViewD3D9(HWND hWnd, CViewDesc& oDesc);
	~CViewD3D9();

	void init				();
	bool loadTexture		(CImage& oImage);
	void unloadTexture		(CImage& oImage);
	void render				();

	LPDIRECT3DDEVICE9			m_pD3dDevice;
	int							m_iWidth;
	int							m_iHeight;

private:
	void createQuad			();

	LPDIRECT3DVERTEXBUFFER9				m_pDXQuad;
	map<CImage*, LPDIRECT3DTEXTURE9>	m_pDXTextureMap;
};

#endif
